Skip to content

feat(xiao): add Seeed XIAO STM32C5 board support - #3048

Open
cumin777 wants to merge 2 commits into
stm32duino:mainfrom
cumin777:feat/xiao-stm32c5
Open

feat(xiao): add Seeed XIAO STM32C5 board support#3048
cumin777 wants to merge 2 commits into
stm32duino:mainfrom
cumin777:feat/xiao-stm32c5

Conversation

@cumin777

@cumin777 cumin777 commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR adds the board definition and variant support for the Seeed XIAO STM32C5.

This PR implements the following features:

  • Seeed XIAO STM32C5 board variant, pin mapping and linker script
  • Board menu configuration for the STM32C5A3 device
  • SPI3, I2C, USART1, onboard IMU and CAN standby pin definitions
  • Onboard physical BOOT0/user button on PH2, exposed as an additional digital pin and through the standard B1_BTN/USER_BTN macros
  • Breaking changes

Motivation

Keep this PR limited to board support while exposing all physically available board I/O. The user button is connected to PH2/BOOT0 and is active low during normal operation; it is also sampled by the MCU during reset, so holding it while powering on or resetting may affect boot behavior.

The USB HAL v2 implementation, UART compatibility fix, and UF2 upload tooling are reviewed in separate PRs (#3059, #3060 and #3061). The UF2 upload path additionally depends on Arduino_Tools #122 and a subsequent STM32Tools package release/index update.

Validation

The board variant has been compiled and exercised on Seeed XIAO STM32C5 with GPIO, UART, SPI3, I2C, onboard IMU and the physical PH2 button mapping.

Code formatting

  • Ensure AStyle check is passed thanks CI

Closing issues

N/A

@fpistm fpistm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @cumin777
thanks for this PR.
It is a first round of review.
Have you any link on the board?

Comment thread libraries/USBDevice/inc/usbd_conf.h Outdated
Comment thread libraries/USBDevice/inc/usbd_conf.h Outdated
Comment thread libraries/USBDevice/src/usbd_confv2.c Outdated
Comment thread libraries/USBDevice/src/usbd_conf_c5.c Outdated
Comment thread libraries/USBDevice/src/usbd_conf_c5.c Outdated
Comment thread libraries/SPI/src/utility/spi_com.c Outdated
Comment thread libraries/SPI/src/utility/spi_com.c Outdated
Comment thread libraries/SPI/src/utility/spi_com.c Outdated
Comment thread libraries/SPI/src/SPI.cpp Outdated
Comment thread variants/STM32C5xx/C593C(E-G)(T-U)_C5A3CG(T-U)/variant_XIAO_STM32C5.h Outdated
@cumin777

Copy link
Copy Markdown
Contributor Author

Hi @fpistm, thank you for the detailed first review.

  1. The Seeed XIAO STM32C5 is currently in the DVT stage and is planned for public launch in September, so there is no public product page available yet. I will share the official board link once it is published.

  2. I have pushed an update addressing your comments: the USB HAL v2 adapter has been generalized, the USB definitions were moved to the common layer, the board menus now follow the existing core conventions, and the SPI3 MOSI alternate-function name was updated. Could you please check whether this now matches your expectations?

  3. Regarding the SPI initialization regression, I saw that you have opened fix(spi): init never called at begin #3049, which addresses the same root cause. I have removed the board-specific SPI workaround from this PR, so I believe a separate issue is no longer needed. Please let me know if you would still prefer one.

@fpistm

fpistm commented Aug 19, 2026

Copy link
Copy Markdown
Member

Hi, thanks for the update.
and yes an issue for the SPI would help to track it.

As the board is not yet available. It would be fine to keep here only the board support addition and open separate PR for specific feature. I will try on my side and a Nucleo C562RE

@cumin777

Copy link
Copy Markdown
Contributor Author

Hi @fpistm, understood. I will open an issue for this.

Although the board does not yet have a public product page, I can provide test reports to demonstrate the product and its validation status. Our product manager is working to ensure Arduino platform support is ready as early as possible for our users.

If helpful, I would be glad to share this information with you. The current planned public launch date is August 29.

Thank you very much for your support.

@cumin777

cumin777 commented Aug 20, 2026

Copy link
Copy Markdown
Contributor Author

I also noticed that the CI workflows for the latest update are awaiting approval. Could you please approve them when convenient, so the checks can run? :)

@fpistm

fpistm commented Aug 20, 2026

Copy link
Copy Markdown
Member

Thanks for the update. Will check this tomorrow.

@cumin777

Copy link
Copy Markdown
Contributor Author

Hello@fpistm, could you please check it? Our board is approaching the release date. Thank you. :)

@fpistm

fpistm commented Aug 24, 2026

Copy link
Copy Markdown
Member

Hi @cumin777
As said I have to check deeply and like split PR.

@fpistm

fpistm commented Aug 26, 2026

Copy link
Copy Markdown
Member

Hi @cumin777
Could you split the PR per feature?
In thios PR only the board support should be available.

@cumin777 cumin777 changed the title feat: add Seeed XIAO STM32C5 support feat(xiao): add Seeed XIAO STM32C5 board support Aug 27, 2026
@cumin777

Copy link
Copy Markdown
Contributor Author

Hi @fpistm, sorry for the delayed follow-up. I was handling other release-related work and did not track the PR closely enough. Thank you for the guidance.

I have now split the changes as requested:

I will continue separating any remaining shared functionality into focused PRs. Thank you for your patience and for reviewing this work.

@cumin777

Copy link
Copy Markdown
Contributor Author

Follow-up on the split: #3060 now contains the independent HAL v2 UART helper compatibility fix, and #3061 contains the generic UF2 upload recipe. #3048 remains board-only. The XIAO C5 UF2 upload path uses #3061 plus the uf2upload executable from Arduino_Tools #122; end-to-end CDC 1200-bps touch also requires the USB support in #3059. #3060 is independent of the USB, UF2, and Arduino_Tools PRs.

@cumin777

cumin777 commented Aug 27, 2026

Copy link
Copy Markdown
Contributor Author

Updated the board-only PR with the physical BOOT0/user button from the latest board definition: PH2 is now exposed as an additional Arduino digital pin, and the standard STM32 core B1_BTN/USER_BTN macros map to it. The button is active-low in normal operation; because it is also BOOT0, holding it during reset/power-on may affect boot selection.

However, during my actual testing, even when I pressed the boot button and reset it, I was unable to trigger the built-in boot mode of the STM32. This also happened when we used the NUCLEO-C5A3ZG board. I'm not sure if this is a bug or if my usage method is incorrect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants